<?php
require_once "../../../PCO.php";
require_once DIR_CLASSES."client.class";
require_once DIR_FUNCTIONS."functions.php";

$nom_cli="";
$sir_cli="";
$res_cli="";
$num_cli="";
if($_GET[VAR_GET_CLI]!=""){
	$num_cli=$_GET[VAR_GET_CLI]; // recuperer le numero du client en GET.
	$client = new Client();
	$client->setNum($num_cli);
	$client->getAllByNum($num_cli); //recuperer les infos du client.
	$nom_cli=$client->getNom(); // nom du client
	$sir_cli=$client->getSiren(); // SIREN du client
	$res_cli=$client->getResp();  // Responsable du client.
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
	<title></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	
	<script type="text/javascript" src="<?=URL_JS?>jquery.js"></script>
    <script type="text/javascript" src="<?=URL_JS?>jquery.ui.js"></script>
    <script type="text/javascript" src="<?=URL_JS?>jquery-ui.min.js"></script>
	<link rel='stylesheet' type='text/css' href="<?=URL_CSS?>themisstyle.css"/>
		<script type="text/javascript">
		$(document).ready(function(){
			$("#show").click(function(){
					$("#tab").fadeIn(0);
					$("#hide").css("display", "block");
					$("#show").css("display", "none");
			})			
			$("#hide").click(function(){
					$("#tab").fadeOut(0);
					$("#show").css("display", "block");
					$("#hide").css("display", "none");
			})
		});
	</script>
</head>
<body>
    <script type="text/javascript">	
		$('<style type="text/css">.column{visibility:hidden;}</style>').appendTo('head'); // initialisation
        $('body').css({background: '#AFCBF3 url(<?=URL_IMAGES?>load.gif) no-repeat center'})	
		function Add() { // fonction pour ajouter une nouvelle division en choisisant le type et la colonne.
			var type= $("#type").val();
			  var rndNum = Math.random();
			  rndNum = parseInt(rndNum * 10000);
			  i = (rndNum % 94) + 33; 
			  iNettuts.addWidget("#"+$("#col").val(), {
				id: "widget-"+<?php echo $num_cli; ?>+"-"+i,
				color: "color-blue",
				title: $("#type").val()
			  })
			}
    </script>

    <div id='head' class="head" >
		<span id='num_cli' style='display: none;'><?php echo $num_cli; ?></span>
				<table class='sel' id='tab' style='display: none;' >
					<tr >				
						<td>
						<select id="type"> <?php
							/*
								si vous voulez ajouter une nouvelle option, il faut aussi l'ajouter dans la page widget_rpc.php
							*/
						?>
							<option value='Alertes Commerciales'>Alertes Commerciales</option>
							<option value='Autorisations du client'>Autorisations du client</option>
							<option value='Compte'>Compte</option>
							<option value='Contact Client'>Contact Client</option>
							<option value='Fax Recus'>Fax Recus</option>
							<option value='Flux'>Flux</option>
							<option value='Impayes'>Impayes DAI/PTF</option>
							<option value='Mouvements Client'>Mouvements Client</option>
							<option value='Mouvements en Attente'>Mouvements en Attente</option>
							<option value='Remises Dailly'>Remises Dailly</option>
							<option value='Remises Portefeuille'>Remises Portefeuille</option>
							<option value='Signatures Clients'>Signatures Clients</option>
						  </select>
						  en colonne 
							  <select id="col">
								<option value='column1'>1</option>
								<option value='column2'>2</option>
								<option value='column3'>3</option>
							  </select>
						 <input type='button' name='add_button' id ='add_button' onclick='Add();' value='Ajouter' />
						 </td>
					</tr>
				</table>
				<span style='float:right;margin:0px 0px 0px -80px'><a><img id='show' title='afficher le Menu'  src='<?=URL_IMAGES?>downArrow.png'/><img  src='<?=URL_IMAGES?>upArrow.png'  title='Cacher le Menu' id='hide' style='display:none;'/></a></span><br>
    </div>
    <div id="columns">
        <ul id="column1" class="column">

        </ul>
        <ul id="column2" class="column">
            
        </ul>
        <ul id="column3" class="column">
            
        </ul>
        
    </div>
    <script type="text/javascript" src="../vues_client/cookie.jquery.js"></script>
    <script type="text/javascript" src="../vues_client/inettuts_cli.js"></script>
  
</body>
</html>